

from django import template
import re
import ast
import time


register = template.Library()


@register.filter(name='str_to_list')
def str_to_list(info):
    """
    str to list
    """
    # print ast.literal_eval(info), type(ast.literal_eval(info))
    return ast.literal_eval(info)


@register.filter(name='int2str')
def int2str(value):
    """
    int 转换为 str
    """
    return str(value)
